import os
import subprocess

def start_adsb_receiver():
    process = subprocess.Popen(["./dump1090","--interactive --net"], stdout=subprocess.PIPE)
    return process

def stop_adsb_receiver(process):
    process.terminate()

def main():
    adsb_process = start_adsb_receiver()

    stop_adsb_receiver(adsb_process)

if __name__ == "__main__":
    main()